 /*------------------------------------------------------------------------------------------------
Set the gravity of the server.
------------------------------------------------------------------------------------------------*/

local PLUGIN = {}
PLUGIN.Title = "Set Gravity"
PLUGIN.Description = "Set the server gravity."
PLUGIN.Author = "Mattocaster 6"
PLUGIN.ChatCommand = "gravity"
PLUGIN.Usage = "<amount>"
PLUGIN.Privileges = { "Gravity" }

function PLUGIN:Call( ply, args )
if ( ply:EV_HasPrivilege( "Gravity" ) ) then
             if ( #args > 0) then
			 local setting = tonumber( args[ 1 ] )
                   RunConsoleCommand ( "sv_gravity ", setting )
                   evolve:Notify( evolve.colors.blue, ply:Nick(), evolve.colors.white, " has changed the gravity to ", evolve.colors.red, args[1], evolve.colors.white, "." )
             else
                   RunConsoleCommand ( "sv_gravity", 600 )
   evolve:Notify( evolve.colors.blue, ply:Nick(), evolve.colors.white, " has reset the gravity." )
   end
   else
   evolve:Notify( ply, evolve.colors.red, evolve.constants.notallowed )
   end
  
end

evolve:RegisterPlugin( PLUGIN )